$(function() {
	showtime();
	v_left = new Vue({
		el: '#left',
		data: {},
		methods: {
			//常用
			toIndex: function() {
				window.location = "../../page/gover/index.html"
			},

			exitAttendTo: function() {
				$.openDialog({
					'title': '',
					"showClose": false,
					'width': 824,
					'height': 460,
					'url': '../../page/gover/selfHelpExitChoose.html'
				});
			},
			toZhengwu_gr: function() {
				var type = 'gr'
				window.location = "../../page/gover/readIdentityCard.html?type=" + type;

			},
			toZhengwu_qy: function() {
				var type = 'qy'
				window.location = "../../page/gover/readIdentityCard.html?type=" + type;

			},
			toZhengwu_dept: function() {
				var type = 'dept'
				window.location = "../../page/gover/readIdentityCard.html?type=" + type;

			},
			toBianMin: function() {
				window.location = "../../page/convenient/convenient-index.html";
			},
			exitProcess: function(op, type) {
				if(op == 'index') {
					$.showConfirm({
						'title': '',
						'content': '是否退出办理？',
						"showClose": false,
						"sureLabel": "取消",
						"cancelLabel": "退出办理",
						'cancel': this.toIndex
					});
				} else if(op == 'scanner') {
					$.showConfirm({
						'title': '',
						'content': '是否退出办理？',
						"showClose": false,
						"sureLabel": "取消",
						"cancelLabel": "退出办理",
						'cancel': this.toScanner
					});
				} else if(op == 'zhengwu') {
					if(type == 'gr') {
						$.showConfirm({
							'title': '',
							'content': '是否退出办理？',
							"showClose": false,
							"sureLabel": "取消",
							"cancelLabel": "退出办理",
							'cancel': this.toZhengwu_gr,
							key: "type"
						});
					} else if(type == 'qy') {
						$.showConfirm({
							'title': '',
							'content': '是否退出办理？',
							"showClose": false,
							"sureLabel": "取消",
							"cancelLabel": "退出办理",
							'cancel': this.toZhengwu_qy,
							key: "type"
						});
					} else if(type == 'dept') {
						$.showConfirm({
							'title': '',
							'content': '是否退出办理？',
							"showClose": false,
							"sureLabel": "取消",
							"cancelLabel": "退出办理",
							'cancel': this.toZhengwu_dept,
							key: "type"
						});
					}
				} else if(op == 'bianmin') {
					$.showConfirm({
						'title': '',
						'content': '是否退出办理？',
						"showClose": false,
						"sureLabel": "取消",
						"cancelLabel": "退出办理",
						'cancel': this.toBianMin,
						key: "type"
					});
				}
			},

		},
		ready: function() {
					
		}
	});

})
function showtime(){   
		var today;  
		var hour;  
		var second;  
		var minute;  
		var year;  
		var month;  
		var date;  
		var strDate;   
		today=new Date();   
		var n_day = today.getDay();   
		switch (n_day)   
		{   
			case 0:{   
			strDate = "星期日";
			}break;   
			case 1:{   
			strDate = "星期一";
			}break;   
			case 2:{   
			strDate ="星期二";
			}break;   
			case 3:{   
			strDate = "星期三"; 
			}break;   
			case 4:{   
			strDate = "星期四";  
			}break;   
			case 5:{   
			strDate = "星期五";  
			}break;   
			case 6:{   
			strDate = "星期六"; 
			}break;   
			case 7:{   
			strDate = "星期日";  
			}break;   
		}   
		year = today.getYear()+1900;   
		month = today.getMonth()+1;   
		date = today.getDate();   
		hour = today.getHours();   
		minute =today.getMinutes();   
		second = today.getSeconds();   
		if(month<10) month="0"+month;   
		if(date<10) date="0"+date;   
		if(hour<10) hour="0"+hour;   
		if(minute<10) minute="0"+minute;   
		if(second<10) second="0"+second;  
		$(".dataitem-title1").html(hour + ":" + minute);
		$(".dataitem-title2").html(year + "-" + month + "-" + date+" " + strDate);
		$(".index-title1").html(hour + ":" + minute);
		$(".index-title2").html(year + "-" + month + "-" + date)
		$(".index-title3").html(strDate);
		setTimeout("showtime();", 1000);   
} 